package com.dao;

import com.dto.in.AddStudentDto;
import com.dto.in.AddTeacherDto;
import com.dto.in.LoginDto;
import com.dto.in.StudentDto;
import com.entity.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by Administrator on 2018/10/16 0016.
 */
public interface StudentDao {

    List<StudentInfo> findStudentList(@Param("dto") StudentDto studentDto);

    StudentInfo findStudentWhereId(@Param("userId") Integer userId, @Param("studentId") Integer studentId);

    List<StudentInfo> findStudentByUserId(@Param("userId") Integer userId);

    SubjectInfo findSubject(String id);

    int findCertification(@Param("userId") Integer userId);

    int addStudent(AddStudentDto addStudentDto);

    int addStudentDetail(@Param("dto") AddStudentDto addStudentDto);

    int updateStudent(@Param("dto") AddStudentDto addStudentDto);

    int updateStudentDetail(@Param("dto") AddStudentDto addStudentDto);

    int updateTeacher(@Param("dto") AddTeacherDto addTeacherDto);

    List<StudentInfo> myRelease(@Param("userId") Integer userId, @Param("limit") Integer limit);

    int setMyRelease(@Param("userId") Integer userId, @Param("studentId") Integer studentId);

    int findPublishLimit(@Param("userId") Integer userId);

    int findApplyLimit(@Param("userId") Integer userId);

    int findReservationLimit(@Param("userId") Integer userId);

    List<ChangePhoneInfo> findChangePhoneStudent(@Param("userId") Integer userId, @Param("limit") Integer limit);

    List<ChangePhoneInfo> findChangePhoneTeacher(@Param("userId") Integer userId, @Param("limit") Integer limit);

    int findIsPhoneTeacher(@Param("stdUserId") Integer stdUserId, @Param("teaUserId") Integer teaUserId);

    int addParentAndTeacher(@Param("userId") Integer userId, @Param("stdId") Integer stdId, @Param("teaUserId") Integer teaUserId, @Param("teaId") Integer teaId);

    int addParentAndTeacher2(@Param("userId") Integer userId, @Param("stdId") Integer stdId, @Param("teaUserId") Integer teaUserId, @Param("teaId") Integer teaId);

    int findIsHaveData(@Param("stdUserId") Integer stdUserId, @Param("teaUserId") Integer teaUserId);

    int agreeChangePhone(@Param("applyPhoneId") Integer applyPhoneId);

    int deleteChangePhone(@Param("applyPhoneId") Integer applyPhoneId);

    List<CertificationInfo> findCertificationList(@Param("page") Integer page, @Param("length") Integer length, @Param("search") String search, @Param("type") Integer type);

    int findCertificationListCount(@Param("search") String search, @Param("type") Integer type);

    int setCertification(@Param("id") Integer id, @Param("type") Integer type);

    int findUserType1();

    int findUserType2();

    List<AssociationInfo> findStatistics1();

    List<AssociationInfo> findStatistics2();

    List<LoginInfo> findUserList(@Param("page") Integer page, @Param("length") Integer length, @Param("search") String search);

    int findParentMyRelease(@Param("id") Integer id);

    List<Teacher> findAll(@Param("page") Integer page, @Param("length") Integer length, @Param("phone") String search);

    int findCount(@Param("search") String search);

    int findUserListCount(@Param("search") String search);

    List<StudentInfo> houduanMyRelease(@Param("userId") Integer userId, @Param("limit") Integer limit);

}
